{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f603c858-fcb3-4d2a-b748-09d298c62d5c",
   "metadata": {},
   "source": [
    "# Histogram\n",
    "\n",
    "A histogram showing the distribution of a numeric variable built from random data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f95a7d9b-e35e-4eb9-8ef1-3d5d5371daec",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "\n",
    "np.random.seed(42)\n",
    "df = pd.DataFrame({'values': np.random.normal(loc=0, scale=1, size=500)})\n",
    "\n",
    "df.hvplot.hist(\n",
    "    y='values',\n",
    "    bins=30,\n",
    "    title='Histogram (Bokeh)',\n",
    "    xlabel='Value',\n",
    "    ylabel='Density'\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f44c1a52-6bb1-46e6-8806-140228703eae",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "np.random.seed(42)\n",
    "df = pd.DataFrame({'values': np.random.normal(loc=0, scale=1, size=500)})\n",
    "\n",
    "df.hvplot.hist(\n",
    "    y='values',\n",
    "    bins=30,\n",
    "    title='Histogram (Matplotlib)',\n",
    "    xlabel='Value',\n",
    "    ylabel='Density'\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bb948266-934e-43bd-9d05-90ce78adce80",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Histogram reference documentation](../../ref/api/manual/hvplot.hvPlot.hist.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
